Functions > PIC2List Functions > PIC2List General Functions |
Copy Code | |
---|---|
BOOL P2LValid(const P2LIST* p2l); |
P2LValid returns TRUE if the PIC2List appears to be valid. If p2l->list is 0, then p2l->len and p2l->size must be 0. Otherwise, p2l->size must be greater than or equal to p2l->len and the list is walked from beginning to end to make sure that the packet lengths and the binary 0 byte following the last packet are consistent with p2l->len.
Copy Code | |
---|---|
BOOL P2LAlloc(P2LIST* p2l, DWORD size); |
P2LAlloc allocates a new PIC2List or enlarges a previously-allocated PIC2List. P2LAlloc returns TRUE if the allocation succeeds, otherwise a memory allocation error has occurred and P2LAlloc returns FALSE.
Copy Code | |
---|---|
voidP2LFree(P2LIST* p2l); |
P2LFree frees the PIC2List's buffer and sets p2l->list, p2l->len, and p2l->size to 0.